package main

import "fmt"

/*
* Author: JacksonCoder
* CreateTime: 2025/5/18
 */
type Person1 struct {
	Name string
	Age  int
}

type Teacher struct {
	Salary int
	Class  string
}

type Man struct {
	sex     string
	job     Teacher // 别名，集成Teacher
	Person1         // 基础 Person1
}

func main() {
	var man1 = new(Man)
	man1.Age = 34
	man1.Name = "alen"
	man1.job.Salary = 34000
	fmt.Println("man1:", man1, man1.job.Salary) //  man1: &{ {34000 } {alen 34}} 34000

	var man2 = Man{
		sex: "male",
		job: Teacher{
			Salary: 65454,
			Class: "leader",
		},
		Person1: Person1{
			Name: "alen",
			Age: 18,
		},
	}
	fmt.Println("man2",man2)  // man2 {male {65454 leader} {alen 18}}
}
